import request from '@/utils/request'

export default {
    updateCount(data?:any) {
        return request({
            url: '/goods/freeTimes',
            method: 'put',
            data
        })
    },
    getCount() {
        return request({
            url: '/goods/freeTimes',
            method: 'get'
        })
    },
    getUserList(data?:any) {
        return request({
            url: '/system/getUserList',
            method: 'post',
            data
        })
    },
    login(data?:any) {
        return request({
            url: '/system/login',
            method: 'post',
            data
        })
    },
    deleteUser(id?:any) {
        return request({
            url: `/system/delete/${id}`,
            method: 'delete'
        })
    },
    loginout(){
        return request({
            url: `/system/logout`,
            method: 'delete'
        })
    },
    totalIncome(data?:any){
        return request({
            url: `/orderinfo/orderPage?indexPage=${data.indexPage}&pageSize=${data.pageSize}&startTime=${data.startTime}&endTime=${data.endTime}`,
            method: 'post'
        })
    },
    allGood(data?:any){
      return request({
        url: `/goods/allGoods`,
        method: 'post',
      })
    },
    changeGood(data?:any){
        return request({
          url: `/goods/changeGood`,
          method: 'put',
          data
        })
      }
}